<?php

namespace App;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Notifications\Notifiable;

class Article extends Model
{
    //
    public function hasManyComments(){
        return $this->hasMany('App\Comment', 'article_id', 'id');
    }

    public function hasManyUpvotes(){
        return $this->hasMany('App\Upvote','article_id', 'id');
    }

    public function hasManyUsers(){
        return $this->hasMany('App\User', 'id', 'user_id');
    }
    

}
